red_color_id = 1
blue_color_id = 2
green_color_id = 3


for obj in $ where(substring obj.name 1 4  == "road") do
(
	specials = #("road292")
	red_pieces  = #(#{1..2, 5..6, 13..14, 17}	)
	blue_pieces = #(#{3..4, 7..8, 15..16}			)
	
	if (findItem specials obj.name) > 0 then
	(
		index = findItem specials obj.name
		polyop.setFaceMatID obj blue_pieces[index] red_color_id
		polyop.setFaceMatID obj red_pieces[index] blue_color_id
	)
	else
	(
	for f = 1 to obj.numfaces where(obj.parent == undefined) do
	(
		temp =polyop.getFaceMatID obj f
		if temp == blue_color_id do
		(
			polyop.setFaceMatID obj f red_color_id
		)
		if temp == red_color_id do
		(
			polyop.setFaceMatID obj f blue_color_id
		)
	)
	)
)